package com.molyfun.parents.rest.bean;

import android.os.Parcel;
import android.os.Parcelable;

import com.molyfun.parents.activity.report.iepPlan.IProductDetailTabCell;
import com.molyfun.parents.activity.report.plan.IPlantDetailTabCell;
import com.molyfun.parents.rest.BaseResponse;

import java.util.List;

/**
 * Created by william(liuchao.hit@gmail.com).
 * Date:10/24/16.
 */
public class PlanDetailResponse extends BaseResponse{


    /**
     * data : {"id":"4028b8816072682e0160726e7408006f","begindatetime":1513699200000,"enddatetime":1514649600000,"fieldlist":[{"fieldtempname":"大肌肉","targetlist":null,"templist":[{"id":"8a2d926356d605f70156d62b931a3963","name":"移动性活动"}]},{"fieldtempname":"小肌肉","targetlist":null,"templist":[{"id":"8a2d926356d605f70156d62b7dbd3764","name":"伸手拾放物件"}]},{"fieldtempname":"自理","targetlist":null,"templist":[{"id":"8a2d926356d605f70156d62bd3da3c70","name":"如厕技能"}]},{"fieldtempname":"社交与情绪","targetlist":null,"templist":[{"id":"8a2d926356d605f70156d62d4092444f","name":"自我概念"}]}],"doclist":[{"url":"http://media.molyfun.com/undefined","name":"1.png","type":"1"},{"url":"http://media.molyfun.com/mf/training/file_2049-133658688.docx","name":"测试文档.docx","type":"5"},{"url":"http://media.molyfun.com/mf/training/file_2049-133710722.xlsx","name":"测试文档01.xlsx","type":"5"}]}
     */

    private PlanDetailBean data;

    public PlanDetailBean getData() {
        return data;
    }

    public void setData(PlanDetailBean data) {
        this.data = data;
    }

    public static class PlanDetailBean {
        /**
         * id : 4028b8816072682e0160726e7408006f
         * begindatetime : 1513699200000
         * enddatetime : 1514649600000
         * fieldlist : [{"fieldtempname":"大肌肉","targetlist":null,"templist":[{"id":"8a2d926356d605f70156d62b931a3963","name":"移动性活动"}]},{"fieldtempname":"小肌肉","targetlist":null,"templist":[{"id":"8a2d926356d605f70156d62b7dbd3764","name":"伸手拾放物件"}]},{"fieldtempname":"自理","targetlist":null,"templist":[{"id":"8a2d926356d605f70156d62bd3da3c70","name":"如厕技能"}]},{"fieldtempname":"社交与情绪","targetlist":null,"templist":[{"id":"8a2d926356d605f70156d62d4092444f","name":"自我概念"}]}]
         * doclist : [{"url":"http://media.molyfun.com/undefined","name":"1.png","type":"1"},{"url":"http://media.molyfun.com/mf/training/file_2049-133658688.docx","name":"测试文档.docx","type":"5"},{"url":"http://media.molyfun.com/mf/training/file_2049-133710722.xlsx","name":"测试文档01.xlsx","type":"5"}]
         */

        private String id;
        private long begindatetime;
        private long enddatetime;
        private List<FieldlistBean> fieldlist;
        private List<AnalysislistBean> doclist;

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public long getBegindatetime() {
            return begindatetime;
        }

        public void setBegindatetime(long begindatetime) {
            this.begindatetime = begindatetime;
        }

        public long getEnddatetime() {
            return enddatetime;
        }

        public void setEnddatetime(long enddatetime) {
            this.enddatetime = enddatetime;
        }

        public List<FieldlistBean> getFieldlist() {
            return fieldlist;
        }

        public void setFieldlist(List<FieldlistBean> fieldlist) {
            this.fieldlist = fieldlist;
        }

        public List<AnalysislistBean> getDoclist() {
            return doclist;
        }

        public void setDoclist(List<AnalysislistBean> doclist) {
            this.doclist = doclist;
        }

        public static class FieldlistBean implements IPlantDetailTabCell,Parcelable {
            /**
             * fieldtempname : 大肌肉
             * targetlist : null
             * templist : [{"id":"8a2d926356d605f70156d62b931a3963","name":"移动性活动"}]
             */

            private String fieldtempname;
            private Object targetlist;
            private List<TemplistBean> templist;

            protected FieldlistBean(Parcel in) {
                fieldtempname = in.readString();
            }

            public static final Creator<FieldlistBean> CREATOR = new Creator<FieldlistBean>() {
                @Override
                public FieldlistBean createFromParcel(Parcel in) {
                    return new FieldlistBean(in);
                }

                @Override
                public FieldlistBean[] newArray(int size) {
                    return new FieldlistBean[size];
                }
            };

            public String getFieldtempname() {
                return fieldtempname;
            }

            public void setFieldtempname(String fieldtempname) {
                this.fieldtempname = fieldtempname;
            }

            public Object getTargetlist() {
                return targetlist;
            }

            public void setTargetlist(Object targetlist) {
                this.targetlist = targetlist;
            }

            public List<TemplistBean> getTemplist() {
                return templist;
            }

            public void setTemplist(List<TemplistBean> templist) {
                this.templist = templist;
            }

            @Override
            public int describeContents() {
                return 0;
            }

            @Override
            public void writeToParcel(Parcel dest, int flags) {
                dest.writeString(fieldtempname);
            }



            public static class TemplistBean implements IProductDetailTabCell{
                /**
                 * id : 8a2d926356d605f70156d62b931a3963
                 * name : 移动性活动
                 */

                private String id;
                private String name;

                public String getId() {
                    return id;
                }

                public void setId(String id) {
                    this.id = id;
                }

                public String getName() {
                    return name;
                }

                public void setName(String name) {
                    this.name = name;
                }
            }
        }

        public static class AnalysislistBean implements IPlantDetailTabCell{
            /**
             * url : http://media.molyfun.com/undefined
             * name : 1.png
             * type : 1
             */

            private String url;
            private String name;
            private String type;

            public String getUrl() {
                return url;
            }

            public void setUrl(String url) {
                this.url = url;
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            public String getType() {
                return type;
            }

            public void setType(String type) {
                this.type = type;
            }

            @Override
            public String getFieldtempname() {
                return name;
            }
        }
    }
}
